//
//  UIFitButton.m
//  HuiLife
//
//  Created by wkx on 13-10-10.
//  Copyright (c) 2013年 apple. All rights reserved.
//

#import "UIFitButton.h"

@implementation UIFitButton

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        // Initialization code
    }
    return self;
}

- (UIEdgeInsets)alignmentRectInsets {
    
    UIEdgeInsets insets;
    if (IOS7) {
        if (self.isleftBtn) {
            insets = UIEdgeInsetsMake(0, 9.0f, 0, 0);
        }
        else { // IF_ITS_A_RIGHT_BUTTON
            insets = UIEdgeInsetsMake(0, 0, 0, 9.0f);
        }
    }
    else
    {
        insets = UIEdgeInsetsZero;
    }
    return insets;
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect
{
    // Drawing code
}
*/

@end
